//
//  VOCWordTest.h
//  iVoc
//
//  Created by Wallace Wu on 09-3-24.
//  Copyright 2009 Sonic Solutions. All rights reserved.
//

#import "VOCWordList.h"

@interface VOCWordTest : NSObject<NSCoding> {
    VOCWordList *currentList;
    NSUInteger currentWordIndex;
    NSMutableArray *_currentChoices;
    NSUInteger rightChoice;
    NSUInteger rightTimes;
    NSUInteger wrongTimes;
    NSUInteger choiceLimit;
    BOOL       hasMadeChoice;
    NSUInteger *seeds;
    VOCWORDLanguage testLanguage;
}
+(VOCWordTest*)pausedTest;

-(id)initWithWordList:(VOCWordList*)aList;

/*
    this two apis and properties basically build a main loop in a test session.
    use startTest to start, and next to jump to next one.
    in the loop, use the currentChoices and rightChoices to find related data about it.
*/
-(void)startTest;
-(void)stopTest;
-(BOOL)next;
@property(assign,readonly) BOOL hasEndTest;
@property(copy,readonly) NSArray* currentChoices;
@property(assign,readonly) NSUInteger rightChoice;
-(BOOL)makeChoice:(NSUInteger)index;

+(BOOL)hasPausedTest;
-(BOOL)pauseTest;

-(VOCWORDLanguage)sourceLanguage;

@property(retain) VOCWordList *currentList;
@property(retain,readonly) VOCWordData *currentWord;
@property(assign,readonly) NSUInteger rightTimes;
@property(assign,readonly) NSUInteger wrongTimes;
@property(assign) NSUInteger choiceLimit;
@property(assign) VOCWORDLanguage testLanguage;
@end
